import axios from "axios";
import adapter from "uni-axios-adapter";

const http = axios.create({
  baseURL: "https://apphoshna.c8plus.net/web/index.php?store_id=1&r=api/", // 替换为你的API地址
  adapter: adapter, // 使用uni-axios-adapter适配器
});
// 封装GET请求
export const get = (url, params) => {
  return http.get(url, { params });
};

// 封装POST请求
export const post = (url, data) => {
  return http.post(url, data);
};

// 导出http实例，以便在需要的地方做一些特殊处理
export default http;
